package com.px.mapper;

import com.px.pojo.ShOrder;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface ShOrderMapper {

    //获取订单列表
    List<ShOrder> selectShOrderList(@Param("orderNo") String orderNo,
                                    @Param("userId") Integer userId,
                                    @Param("commodityId") Integer commodityId,
                                    Double minPrice,Double maxPrice,
                                    @Param("payStatus") Integer payStatus,
                                    @Param("aliTradeNo") String aliTradeNo,
                                    @Param("pageBegin") Integer pageBegin, @Param("pageSize") Integer pageSize)throws Exception;

    //获取订单记录数
    int selectShOrderCount(@Param("orderNo") String orderNo,
                           @Param("userId") Integer userId,
                           @Param("commodityId") Integer commodityId,
                           Double minPrice,Double maxPrice,
                           @Param("payStatus") Integer payStatus,
                           @Param("aliTradeNo") String aliTradeNo)throws Exception;

    //获取订单信息
    ShOrder selectShOrder(@Param("orderId") Integer orderId)throws Exception;

    //添加订单信息
    int insertShOrder(ShOrder shOrder)throws Exception;

    //更新订单信息
    int updateShOrder(ShOrder shOrder)throws Exception;

    //删除订单信息
    int deleteShOrder(@Param("orderId")Integer id)throws Exception;
}
